package com.sunrise.xdoc.view.system;

import org.springframework.security.core.Authentication;
import org.springframework.security.core.context.SecurityContextHolder;

import javax.faces.bean.ManagedBean;

/**
 * The Class MenuBar.
 *
 * @author Nguyen Duc Dung
 * @since 6/1/13 10:36 PM
 */
@ManagedBean
public class MenuBar {

    public String getCurrentUserName() {
        Authentication auth = SecurityContextHolder.getContext().getAuthentication();
        return auth.getName();
    }

}
